<?php
$user = $data['user'];
//dump($data);


?>
<!DOCTYPE html>
<html lang="zhcn" style="font-size:50px">
<head>
    <include file="Common/meta" />
    <title>LIKE - {$_ENV['site'][0]['title']}</title>
    <include file="Common/link" />
</head>
<body>
<div class="layout-header">
    <div class="container">
        <h1 class="title">LIKE</h1>
        <a class="header-back" href="/user/personCenter"><i class="icon icon-left"></i></a>
    </div>
</div>
<include file="Common/header" />
<div class="container container-main">
    <ul class="common-tab-list nav">
        <li class="nav-item"><a class="nav-link" href="/like/likeMe">企业LIKE</a></li>
        <li class="nav-item active"><a class="nav-link" href="/like/myLike">我LIKE</a></li>
    </ul>
    <div class="row">
        <div class="contain-full">
            <section class="box box-tab">

                <div class="box-body">
                    <?php
                //dump($data);
            ?>
                    <div>


                    </div>
                    <if condition="count($data['list']) eq 0">
                        <div id="search-empty" class="content-empty show">
                            <div class="picture"></div>
                            <div class="no-data">您还没有LIKE任何企业，<a href="/index/foundCompany">去寻找企业</div>
                        </div>
                    </if>
                    <ul class="list like-list">
                        <foreach name="data['list']" item="com">
                            <li class="list-item">
                                <img class="item-logo mylike-logo" src="{$com['logo']}">
                                <div class="item-info mylike-info">
                                    <div><a class="item-name" href="/cpn/detail?id={$com['id']}">{$com['name']}</a>
                                    </div>
                                    <div class="like-info">Like信息：{$com['like_msg']}</div>
                                    <div>
                                        <span class="like-time">{$com['create_time']|strtotime|date="Y-m-d H:i",###}</span>
                                    </div>
                                </div>
                            </li>
                        </foreach>

                    </ul>


                </div>

            </section>
        </div>
    </div>
</div>

<include file="Common/script" />
<script>
    // 设置是否对外显示重要信息
    $('#modify-open').on('click', function (e) {
        e.preventDefault();

        $.ajax({
            url: '/user/hideInfoToggle',
            dataType: 'json',
            success: function (obj) {
                if (obj.code === 0) {
                    //location.reload(true);
                    if (page.isOpen === 1) {
                        page.isOpen = 0;
                        $('#open-state').text('否');
                    } else {
                        page.isOpen = 1;
                        $('#open-state').text('是');
                    }
                } else {
                    eui.msg('操作失败');
                }
            },
            error: function () {
                eui.msg('系统出错');
            }
        });
    });

    // 分页
</script>
</body>
</html>

